using ETask.Api.Dtos;

namespace ETask.Api.Services
{
    public interface IProjectMemberService
    {
        /// <summary>
        /// 添加项目成员
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <param name="userList">成员列表</param>
        /// <returns></returns>
        Task<ApiResponse> AddProjectMembers(int projectId, List<ProjectMemberDto> userList);

        /// <summary>
        /// 根据ID删除项目成员
        /// </summary>
        /// <param name="id">成员ID</param>
        /// <returns></returns>
        Task<ApiResponse> DeleteProjectMember(int id);

        /// <summary>
        /// 更新项目成员信息
        /// </summary>
        /// <param name="memberDto">成员信息</param>
        /// <returns></returns>
        Task<ApiResponse> UpdateProjectMember(ProjectMemberDto memberDto);

        /// <summary>
        /// 获取项目成员列表
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <returns></returns>
        Task<ApiResponse> GetProjectMembers(int projectId);

        /// <summary>
        /// 批量添加项目成员
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <param name="userIds">用户ID列表</param>
        /// <param name="role">角色</param>
        /// <returns></returns>
        Task<ApiResponse> BatchAddProjectMembers(int projectId, List<int> userIds, string role = "developer");

        /// <summary>
        /// 检查用户是否已是项目成员
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        Task<ApiResponse> CheckMemberExists(int projectId, int userId);
    }
}
